package com.example.administrator.express.activity;


import com.example.administrator.express.R;
import com.example.administrator.express.db.UserDao;
import com.example.administrator.express.model.Users;
import com.example.administrator.express.utils.SharedPreferences;

import android.os.Bundle;
import android.os.Handler;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.WindowManager;

public class Appstart extends Activity{

	@Override
	public void onCreate(Bundle savedInstanceState) {

		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);	
		setContentView(R.layout.appstart);
		//requestWindowFeature(Window.FEATURE_NO_TITLE);//ȥ��������
		//getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        //        WindowManager.LayoutParams.FLAG_FULLSCREEN);   //ȫ����ʾ
		//Toast.makeText(getApplicationContext(), "���ӣ��úñ��У�", Toast.LENGTH_LONG).show();
		//overridePendingTransition(R.anim.hyperspace_in, R.anim.hyperspace_out);
		
	new Handler().postDelayed(new Runnable(){
		@Override
		public void run(){

			SharedPreferences sharedPreferences=SharedPreferences.getInstance();
			Integer loginId=sharedPreferences.getInt("loginId",0);
			System.out.println("loginiD："+loginId );
			if(loginId==0){
				Intent intent = new Intent (Appstart.this,Login.class);
				startActivity(intent);
				Appstart.this.finish();
			}else {
					Intent intent = new Intent(Appstart.this, MainActivity.class);
					startActivity(intent);
					Appstart.this.finish();
			}


		}
	}, 1000);
   }
}